<template>
  <div class="">
    <a-row style="margin-top: 0" :gutter="[24, 24]">
      <a-col :sm="24" :md="12" :xl="6">
        <a-card>
          <a-statistic
            title="商户今日卖出/笔"
            :value="statis.buys_count_today"
          />
          <a-statistic
            title="商户今日卖出/笔"
            :value="statis.buys_count_today"
            style="margin-top: 24px"
          />
          <a-statistic
            title="商户今日卖出手续费"
            :value="statis.buys_fee_sum_today"
            :precision="2"
            style="margin-top: 24px"
          >
            <template #prefix> ￥ </template>
          </a-statistic>
        </a-card>
      </a-col>

      <a-col :sm="24" :md="12" :xl="6">
        <a-card>
          <a-statistic
            title="用户今日买入/笔"
            :value="statis.buys_count_today"
          />
          <a-statistic
            title="用户今日卖出/笔"
            :value="statis.sells_count_today"
            style="margin-top: 24px"
          />
        </a-card>
      </a-col>

      <a-col :sm="24" :md="12" :xl="6">
        <a-card>
          <a-statistic
            title="代理累计佣金"
            :value="statis.agencies_fee_sum"
            :precision="2"
          >
            <template #prefix> ￥ </template>
          </a-statistic>
        </a-card>
      </a-col>
    </a-row>
  </div>
</template>

<script>
export default {
  name: 'dashboard',
  //   i18n: require('./i18n'),
  data() {
    return {
      loading: true,
      statis: {},
    }
  },
  created() {
    // setTimeout(() => (this.loading = !this.loading), 1000)
    this.axios.get('/s/dashboard').then((res) => {
      this.statis = res.data.data
      this.loading = false
    })
  },
}
</script>

<style lang="less" scoped>
</style>
